<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<title>我的订单</title>
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="./css/style.css">

</head>
<body>
	<!-- start header -->
	<!--end header -->

	<!-- start banner_x -->
	<div class="banner_x center">
		<a href="./index.html" target="_blank"><div class="logo fl"></div></a>

		<div class="wdgwc fl ml40"><h1>我的订单:</h1></div>
		<div class="dlzc fr"></div>
		<div class="clear"></div>
	</div>
	<div class="xiantiao"></div>

	<hr color="orange" size=2px>
	<div class="section-left"></div>
	<div class="section-right">

		<div class="rtcont fr">
			<c:if test="${qiao == '1'}">
				<div class="ddxq">
					<div class="ddspt fl"></div>
					<div class="ddbh fl">订单号:${neworder.getOID()+10000000}</div>
					<div class="ztxx fr">
						<ul>
							<c:if test="${neworder.getType()==1}">
								<li><c:out value="未支付" /></li>
							</c:if>
							<c:forEach items="${neworder.getOrderList()}" var="oi">
								<li>${oi.getGoodsName()}</li>
								<li>数量：${oi.getNums()}</li>
								<li>总价：￥${oi.getAllPrice()}</li>
							</c:forEach>
							<li>${neworder.getOrderTime()}</li>
							<div class="clear"></div>
						</ul>
						<div style="float: right; padding-top: 50px; margin-top: -160px">
						</div>
						<hr>
					</div>
				</div>
				<%
					request.getSession().removeAttribute("qiao");
				%>
				<a href="${path }/user/cart/showCarts"
					style="text-decoration: underline;">返回购物车界面</a>
				<a href="${path }/user/order/toShxx?oid=${neworder.getOID()}"
					style="text-decoration: underline;">前往填写个人信息</a>
			</c:if>
			<c:if test="${qiao != '1'}">
				<!--遍历带有订单项集合的订单集合  -->
				<c:forEach items="${orders }" var="oo">

					<div class="ddspt fl">
						<%-- <img src="${path}/img/'+'${oo.get}" alt=""> --%>
					</div>
					<div class="ddbh fl">订单号:${oo.getOID()+10000000}</div>
					<div class="ztxx fr">
						<ul>
							<c:if test="${oo.getType()==1}">
								<li><c:out value="未支付" /></li>
							</c:if>
							<c:if test="${oo.getType()==2}">
								<li><c:out value="已支付（需要确认）" /></li>
							</c:if>
							<c:if test="${oo.getType()==3}">
								<li><c:out value="订单完成" /></li>
							</c:if>
							<c:if test="${oo.getType()==4}">
								<li><c:out value="取消订单" /></li>
							</c:if>
							<c:if test="${oo.getType()==5}">
								<li><c:out value="申请退款中" /></li>
							</c:if>
							<c:if test="${oo.getType()==6}">
								<li><c:out value="退款完成" /></li>
							</c:if>
							<c:forEach items="${oo.getOrderList()}" var="oi">
								<li>${oi.getGoodsName()}</li>
								<li>数量：${oi.getNums()}</li>
								<li>总价：￥${oi.getAllPrice()}</li>
							</c:forEach>
							<li>${oo.getOrderTime()}</li>
							<div class="clear"></div>
						</ul>
						<div style="float: right; padding-top: 50px; margin-top: -160px">
							<c:if test="${oo.getType()==2}">
								<a href="${path}/user/order/tuikuan?oid=${oo.getOID()}"> <span>申请退款
								</span>
								</a>
								<a href="${path}/user/order/querenshouhuo?oid=${oo.getOID()}">
									<span>确认收货</span>
								</a>
							</c:if>
							<c:if test="${oo.getType()==1}">
								<a href="${path}/user/order/forPay?oid=${oo.getOID()}"> <span>前往付款
								</span>
								</a>
								
							</c:if>
							<%
								String tips = (String) request.getAttribute("tips"); // 获取错误属性
										if (tips != null) {
							%>
							<script type="text/javascript" language="javascript">
											alert("<%=tips%>"); // 弹出错误信息
							</script>
							<%
								request.getSession().removeAttribute("qiao");
										}
							%>

						</div>
						<hr>
					</div>
				</c:forEach>
		<a href="${path }/home/index" style="text-decoration: underline;">前往首页</a>
			</c:if>
		</div>
	</div>



</body>
</html>
